<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Button 按钮 | WUU-UI</title>
    <meta name="generator" content="VuePress 1.8.2">
    
    <meta name="description" content="WUU-UI">
    
    <link rel="preload" href="/mall-ui/assets/css/0.styles.fb3964a0.css" as="style"><link rel="preload" href="/mall-ui/assets/js/app.71961e7f.js" as="script"><link rel="preload" href="/mall-ui/assets/js/2.f1cb9681.js" as="script"><link rel="preload" href="/mall-ui/assets/js/9.1c35ec6b.js" as="script"><link rel="prefetch" href="/mall-ui/assets/js/10.11912e0a.js"><link rel="prefetch" href="/mall-ui/assets/js/11.bca6f591.js"><link rel="prefetch" href="/mall-ui/assets/js/12.b3358f86.js"><link rel="prefetch" href="/mall-ui/assets/js/13.06b07c8e.js"><link rel="prefetch" href="/mall-ui/assets/js/3.4e208c7e.js"><link rel="prefetch" href="/mall-ui/assets/js/4.110a989f.js"><link rel="prefetch" href="/mall-ui/assets/js/5.c89a64a3.js"><link rel="prefetch" href="/mall-ui/assets/js/6.83fdb325.js"><link rel="prefetch" href="/mall-ui/assets/js/7.be3d3bc1.js"><link rel="prefetch" href="/mall-ui/assets/js/8.48f4c41d.js">
    <link rel="stylesheet" href="/mall-ui/assets/css/0.styles.fb3964a0.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/mall-ui/" class="home-link router-link-active"><img src="/mall-ui/images/wuu.png" alt="WUU-UI" class="logo"> <span class="site-name can-hide">WUU-UI</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/mall-ui/comps/configure/introduce.html" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/mall-ui/comps/assembly/slider.html" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/mall-ui/comps/readme/wxsc.html" class="nav-link">
  JS
</a></div><div class="nav-item"><a href="/mall-ui/comps/about/index.html" class="nav-link">
  关于我们
</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/mall-ui/comps/configure/introduce.html" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/mall-ui/comps/assembly/slider.html" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/mall-ui/comps/readme/wxsc.html" class="nav-link">
  JS
</a></div><div class="nav-item"><a href="/mall-ui/comps/about/index.html" class="nav-link">
  关于我们
</a></div> <!----></nav>  <ul class="sidebar-links"><li><a href="/mall-ui/comps/assembly/slider.html" class="sidebar-link">Slider 滑动选择器</a></li><li><a href="/mall-ui/comps/assembly/button.html" aria-current="page" class="active sidebar-link">Button 按钮</a></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="button-按钮"><a href="#button-按钮" class="header-anchor">#</a> Button 按钮</h1> <p>该组件内部实现以uni-appbutton组件为基础，进行二次封装，主要区别在于：
按钮type值有更多的主题颜色
有可选的按钮点击水波纹效果
按钮size值有更多的尺寸可选</p> <p><font size="5"> 基本使用 </font></p> <p>文字内容通过<kbd>slot</kbd>传入</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span><span class="token punctuation">&gt;</span></span>月落<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p><font size="5"> 设置按钮的主题 </font></p> <p><kbd>type</kbd>值可选的有<kbd>default</kbd>(默认)、<kbd>primary</kbd>、<kbd>success</kbd>、<kbd>info</kbd>、<kbd>warning</kbd>、<kbd>error</kbd></p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token punctuation">&gt;</span></span>默认按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>primary<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>主要按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>success<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>成功按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>info<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>信息按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>warning<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>警告按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mall-button</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>error<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>危险按钮<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mall-button</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><div class="demo-model"><div class="model-content"><iframe data-v-16de2a8a="" scrolling="auto" frameborder="0" src="https://h5.uviewui.com/#/pages/componentsC/button/index" id="demo-modal" class="iframe"></iframe></div></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/mall-ui/comps/assembly/slider.html" class="prev">
        Slider 滑动选择器
      </a></span> <!----></p></div> </main></div><div class="global-ui"><!----></div></div>
    <script src="/mall-ui/assets/js/app.71961e7f.js" defer></script><script src="/mall-ui/assets/js/2.f1cb9681.js" defer></script><script src="/mall-ui/assets/js/9.1c35ec6b.js" defer></script>
  </body>
</html>
